<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:t="http://myfaces.apache.org/tomahawk">
<f:loadBundle basename="messages" var="msgs"/>
<c:set var="ctxPath" value="#{facesContext.externalContext.requestContextPath}" scope="request"/>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>SAHP - Login</title>
</head>

<body style="height:100%;">
	<h:form id="autenticacao" style="height:100%;">
	
	<div style="width:100%; height:100%;">
	<div style="height:100%; vertical-align: middle;">
	<table align="center" style="height:100%; vertical-align: middle;">
		<tr><td colspan="2" align="center"><div><img src="${ctxPath}/images/logo_sahp.png" alt="SAHP2" width="289px" height="149px"/></div></td></tr>
		<tr><td colspan="2"><hr/></td></tr>
		<tr>
			<td style="text-align:right;">Usuario:</td><td><h:inputText value="#{loginController.usuario}" /></td>
		</tr>
		<tr>
			<td style="text-align:right;">Senha:</td><td><h:inputSecret value="#{loginController.senha}" /></td>
		</tr>
		<tr><td colspan="2"><hr/></td></tr>
		<tr>
			<td colspan="2" style="text-align:right;"><h:commandButton action="#{loginController.login}" value="Entrar" /></td>
		</tr>
	</table>

	<div align="center">
	<t:messages id="div_mensagens" forceId="true" fatalClass="mensagem_sucesso"
		errorClass="mensagem_erro"
		infoClass="mensagem_info" warnClass="mensagem_alerta"  
		layout="table" rendered="true" 
		replaceIdWithLabel="true"/>
	</div>
	
	</div>
	</div>
	</h:form>
</body>
</html>